package com.tengju.data.infrastructure.persistence.mybatis.mapper.data.custom;

import com.tengju.data.infrastructure.persistence.mybatis.dataobject.AchievementBonusCalMidInfoDO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

public interface AchievementBonusCalMidInfoDOCustomMapper {

    List<LocalDateTime> listLogtimeBeforeClearDate(@Param("clearDate") LocalDateTime clearDate);

    void clearHistoryRecord(@Param("logTime") LocalDateTime logTime);

    void saveMidInfoRealtime(@Param("month") Integer month,
                             @Param("logTime") LocalDateTime logTime,
                             @Param("calType") byte calType);

    void saveMidInfoMonth(@Param("month") Integer month,
                             @Param("logTime") LocalDateTime logTime,
                             @Param("calType") byte calType);

    void saveMidInfoRisk(@Param("month") Integer month,
                          @Param("logTime") LocalDateTime logTime,
                          @Param("calType") byte calType);

    int countByLogTimeAndType(@Param("logTime") LocalDateTime logTime,
                              @Param("calType") byte calType);

    List<AchievementBonusCalMidInfoDO> listMidInfoByLogTimeAndType(@Param("logTime") LocalDateTime logTime,
                                                                   @Param("calType") byte calType,
                                                                   @Param("offset") int offset,
                                                                   @Param("batchQueryLimit") int batchQueryLimit);

}